package day7;

/*
* instanceOf:判断某个对象是否属于某种数据类型
*
* */
public class Demo3 {

    public static void main(String[] args) {
        //创建子类对象
        Demo2Zi demo2Zi = new Demo2Zi();

        //使用多态创建子类对象那个
        Demo2Fu demo2Fu = new Demo2Zi();

        System.out.println(demo2Zi instanceof Demo2Zi);

        System.out.println(demo2Zi instanceof Demo2Fu);

        System.out.println(demo2Fu instanceof Demo2Zi);

        System.out.println(demo2Fu instanceof Demo2Fu);

    }
}
